package com.appistry.management;

import java.net.InetAddress;

public interface WorkerInfo {

	/**
	 * The worker's hardware MAC address
	 * 
	 * @return
	 */
	public String getMacAddress();

	/**
	 * The current state of the transaction processing engine (possible states
	 * are: 'stopped', 'stopping', 'starting' and 'running'.
	 * 
	 * @return
	 */
	public String getState();

	/**
	 * Gets the operating system
	 * 
	 * @return
	 */
	public String getOperatingSystem();

	/**
	 * Gets the total number of CPU cores
	 * 
	 * @return
	 */
	public int getCpuCount();

	/**
	 * Gets the bound network port which identifies the worker's region
	 * 
	 * @return
	 */
	public int getRegionPort();

	/**
	 * Is this the region leader
	 * 
	 * @return
	 */
	public boolean isRegionLeader();

	/**
	 * Indicates whether the worker has a bound port for unencrypted request
	 * services
	 * 
	 * @return
	 */
	public boolean isRequestServiceUp();

	/**
	 * Indicates whether the worker has a bound port for SSL-encrypted request
	 * services
	 * 
	 * @return
	 */
	public boolean isRequestSslServiceUp();

	/**
	 * Gets the IP for the network adapter the fabric will use to communicate with other workers
	 * 
	 * @return
	 */
	public InetAddress getInternalIp();

	/**
	 * Gets the IP the fabric reports based on the 'external-ip-strategy', determined in the fabric.cfg
	 * 
	 * @return
	 */
	public InetAddress getExternalIp();

}